#include<stdio.h>
#include<math.h>
int main()
{
	long sum=0,a,n,num=0,i,j,zhishu;
	scanf("%ld",&a);
	scanf("%ld",&n);
	zhishu=n;
	for(j=0;j<n;j++)
	{
		for(i=0;i<zhishu;i++)
			num+=a*pow(10,i);
		sum+=num;
		zhishu--;
		num=0;
	}
	printf("%ld\n",sum);
}
